package com.yjzx.util;

/**
 * @author yjzx
 * @date 2023/10/24
 * @description
 */
public class StringUtils {

    public static String headUpperCase(String str) {
        if (str == null) {
            return null;
        } else {
            return str.length() != 0 ? str.toUpperCase().charAt(0) + str.substring(1) : str;
        }
    }
    public static boolean isBlank(CharSequence cs) {
        int strLen;
        if (cs != null && (strLen = cs.length()) != 0) {
            for(int i = 0; i < strLen; ++i) {
                if (!Character.isWhitespace(cs.charAt(i))) {
                    return false;
                }
            }

            return true;
        } else {
            return true;
        }
    }

    public static boolean isNotBlank(CharSequence cs) {
        return !isBlank(cs);
    }
}
